"""
Author: runyu.ma

flatten_loop_pass.py
"""

from ..core.dslc_parser import ASTNode, Identifier


def merge_loop_cond_pass(top: ASTNode):
    if isinstance(top, Identifier) and top.name == 'for':
        return 2
    return 0


def merge_while_cond_pass(top: ASTNode):
    if isinstance(top, Identifier) and top.name == 'while':
        return 2
    return 0
